import Code128 from "@/views/Code128.vue"
import Code39 from "@/views/Code39.vue"
import CodeCorrect from "@/views/CodeCorrect.vue"
import CodeCustom from "@/views/CodeCustom.vue"
import CodeEffect from "@/views/CodeEffect.vue"
import ComCodeMake from "@/views/ComCodeMake.vue"
import DataMartrix from "@/views/DataMartrix.vue"
import DrawQrCode from "@/views/DrawQrCode.vue"
import EAN13 from "@/views/EAN13.vue"
import HelloWorld from "@/views/HelloWorld.vue"
import QrCustom from "@/views/QrCustom.vue"
import QrDestroy from "@/views/QrDestroy.vue"
import { createWebHistory,createRouter  } from "vue-router"
//创建路由器
const router = createRouter({
  history: createWebHistory (),
  //管理路由
  routes: [
    {
      // 根路径
      path: '/',
      redirect: '/qrmake'
    },
    {
      //路径
      path: '/qrmake',
      //组件绑定
      name: 'QRMake',
      component: HelloWorld
    },
    {
      //路径
      path: '/qrdestroy',
      //组件绑定
      name: 'QrDestroy',
      component: QrDestroy
    },
    {
      //路径
      path: '/qrcustom',
      //组件绑定
      name: 'QrCustom',
      component: QrCustom
    },
    {
      //路径
      path: '/qrdraw',
      //组件绑定
      name: 'DrawQrCode',
      component: DrawQrCode
    },
    {
      //路径
      path: '/qrcommake',
      //组件绑定
      name: 'ComCodeMake',
      component: ComCodeMake
    },
    {
      //路径
      path: '/qreffect',
      //组件绑定
      name: 'CodeEffect',
      component: CodeEffect
    },
    {
      //路径
      path: '/codecustom',
      //组件绑定
      name: 'CodeCustom',
      component: CodeCustom
    },
    {
      //路径
      path: '/codecorrect',
      //组件绑定
      name: 'CodeCorrect',
      component: CodeCorrect
    },
    {
      //路径
      path: '/ean13',
      //组件绑定
      name: 'Ean13',
      component: EAN13
    },
    {
      //路径
      path: '/code39',
      //组件绑定
      name: 'Code39',
      component: Code39
    },
    {
      //路径
      path: '/code128',
      //组件绑定
      name: 'Code128',
      component: Code128
    },
    {
      //路径
      path: '/datamartrix',
      //组件绑定
      name: 'DataMartrix',
      component: DataMartrix
    },
  
  ],
  
})

export default router